FROM owncloudci/nodejs:8.x

MAINTAINER Sébastien Moratinos <codecombat@sebastien-moratinos.com>

# Update Supervisor
#ADD sources.list /etc/apt/
ADD supervisord.conf /etc/supervisor/conf.d/supervisord.conf

RUN apt-get update


RUN \
  npm install -g brunch && \
  npm install -g bower 

ADD install.sh /root/install.sh
RUN chmod +x /root/install.sh
ADD start.sh /root/start.sh
RUN chmod +x /root/start.sh

ENV COCO_MONGO_HOST dbhost
ENV NODE_ENV development

ADD codecombat /opt/codecombat

EXPOSE 3000

CMD ["/usr/bin/supervisord"]
